package com.iot.manager.ui.activities;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.iot.manager.R;
import com.iot.manager.ui.fragments.DeviceDataFragment;

public class DeviceDataActivity extends AppCompatActivity {
    public static final String EXTRA_DEVICE_ID = "extra_device_id";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_device_data);

        String deviceId = getIntent().getStringExtra(EXTRA_DEVICE_ID);
        if (deviceId != null) {
            getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.fragmentContainer, DeviceDataFragment.newInstance(deviceId))
                .commit();
        } else {
            finish();
        }
    }
} 